package com.gzc.pm.dao;

import java.util.List;

import com.gzc.pm.bean.ToleranceBean;

import cn.skyclass.ibatis.IBatisDao;
import cn.skyclass.net.OperationResult;

public class ToleranceDao {

	private IBatisDao dao = new IBatisDao();
	
	@SuppressWarnings("unchecked")
	public List<ToleranceBean> getInProcIds(String procIdsStr){
		return dao.getList("Tolerance.getInProcIds", procIdsStr);
	}
	
	public ToleranceBean getByEqucId(int equcId){
		return (ToleranceBean) dao.getFirstObject("Tolerance.getByEqucId", equcId);
	}
	
	public OperationResult insert(ToleranceBean bean){
		return dao.executeInsert("Tolerance.insert", bean);
	}
	
	public OperationResult update(ToleranceBean bean){
		return dao.executeInsert("Tolerance.update", bean);
	}
}
